package cn.sanshuilin.kst.system.provider.bean;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Calendar;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2017-12-03 19:34
 * Copyright 2017  by 三水林科技有限公司
 **/
@Entity
@Table(name = "ShareLog")
public class ShareLog implements Serializable {
    private String id;
    private String pubMemberId;
    private String shareId;

    private Member pubMember;
    private String shareLogCategoryName;
    private String shareLogTargetName;
    private String pubDateStr;
    private Share share;

    private Integer shareLogCategoryID;
    private Integer ShareLogTargetID;
    private Calendar pubDate;
    @Transient
    public Integer getShareLogCategoryID() {
        return shareLogCategoryID;
    }
    @Transient
    public Integer getShareLogTargetID() {
        return ShareLogTargetID;
    }

    public void setShareLogCategoryID(Integer shareLogCategoryID) {
        this.shareLogCategoryID = shareLogCategoryID;
    }

    public void setShareLogTargetID(Integer shareLogTargetID) {
        ShareLogTargetID = shareLogTargetID;
    }

    public void setPubDate(Calendar pubDate) {
        this.pubDate = pubDate;
    }

    @Transient
    public Calendar getPubDate() {
        return pubDate;
    }

    public void setPubMember(Member pubMember) {
        this.pubMember = pubMember;
    }

    public void setShareLogCategoryName(String shareLogCategoryName) {
        this.shareLogCategoryName = shareLogCategoryName;
    }

    public void setShareLogTargetName(String shareLogTargetName) {
        this.shareLogTargetName = shareLogTargetName;
    }

    public void setPubDateStr(String pubDateStr) {
        this.pubDateStr = pubDateStr;
    }

    public void setShare(Share share) {
        this.share = share;
    }

    @Transient
    public Member getPubMember() {
        return pubMember;

    }
    @Transient
    public String getShareLogCategoryName() {
        return shareLogCategoryName;
    }
    @Transient
    public String getShareLogTargetName() {
        return shareLogTargetName;
    }
    @Transient
    public String getPubDateStr() {
        return pubDateStr;
    }
    @Transient
    public Share getShare() {
        return share;
    }

    @Id
    @Column(name = "ID", nullable = false, length = 32)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "PubMemberID", nullable = true, length = 32)
    public String getPubMemberId() {
        return pubMemberId;
    }

    public void setPubMemberId(String pubMemberId) {
        this.pubMemberId = pubMemberId;
    }

    @Basic
    @Column(name = "ShareID", nullable = true, length = 32)
    public String getShareId() {
        return shareId;
    }

    public void setShareId(String shareId) {
        this.shareId = shareId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ShareLog that = (ShareLog) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (pubMemberId != null ? !pubMemberId.equals(that.pubMemberId) : that.pubMemberId != null) return false;
        if (shareId != null ? !shareId.equals(that.shareId) : that.shareId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (pubMemberId != null ? pubMemberId.hashCode() : 0);
        result = 31 * result + (shareId != null ? shareId.hashCode() : 0);
        return result;
    }
}
